#ifndef INTERCEPTBALLBEHAVIOUR_H_
#define INTERCEPTBALLBEHAVIOUR_H_

#include "../ModuleInterface.h"
#include "RunToPositionBehaviour.h"
#include "TurnNeckToBehaviour.h"
#include "TurnToBehaviour.h"


/*
 *	Zachyti loptu ak je to mozne. Vracia false ak to nie je mozne.
 *	
 */
class InterceptBallBehaviour : public ModuleInterface
{
	USE_MODULE(RunToPositionBehaviour)
	USE_MODULE(TurnNeckToBehaviour)
	USE_MODULE(TurnToBehaviour)

public:
	virtual bool Behave();
	Point GetNearestBallInterceptPos();

protected:
	bool ShouldInterceptBall();
	Point GetBallInterceptionPoint();
	bool IsBallInPlayerKickableAreaDuringInteception(double lfBallDecayInTime, int time);
	void RunToBallInteceptPosition(Point position);
};


#endif /*INTERCEPTBALLBEHAVIOUR_H_*/
